#!/usr/bin/env bash
#

gpu_type=$(lspci)
if grep -E "NVIDIA|GeForce" <<< ${gpu_type}; then
    pacstrap -K /mnt nvidia --noconfirm --needed
elif lspci | grep 'VGA' | grep -E "Radeon|AMD"; then
    pacstrap -K /mnt xf86-video-amdgpu --noconfirm --needed
elif grep -E "Integrated Graphics Controller" <<< ${gpu_type}; then
    pacstrap -K /mnt libva-intel-driver libvdpau-va-gl lib32-vulkan-intel vulkan-intel libva-intel-driver libva-utils lib32-mesa --noconfirm --needed
elif grep -E "Intel Corporation UHD" <<< ${gpu_type}; then
    pacstrap -K /mnt libva-intel-driver libvdpau-va-gl lib32-vulkan-intel vulkan-intel libva-intel-driver libva-utils lib32-mesa --noconfirm --needed
fi
